home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / QLST14.QM < prev    next >
Text File  |  1991-07-10  |  9KB  |  197 lines

  1. *                              QLST14.QM, v1.4a                July 10, 1991
  2. *                     Macro To Load Files From FileList
  3. *                          Written by Tom Hogshead
  4. *                   With Macro Contribution by Kyle Watkins
  5. *
  6. * ┌────────────────────────────[ (INDEX) ]─────────────────────────────────┐
  7. * │
  8. * │  @(0) - Loads files from FileList, reads macfile of first file
  9. * │
  10. * │  @(1) - Loads files from FileList, does NOT read macfile,
  11. * │         (Kyle Watkins author)
  12. * │
  13. * └────────────────────────────────────────────────────────────────────────┘
  14. *
  15. * DESCRIPTION:
  16. *
  17. * QLST14.QM are macros that enables QEdit to load a list of files from
  18. * a FileList file of unlimited length. These may be two of the broadly
  19. * most useful macros so far.
  20.  
  21. * The @1 macro was written by Kyle Watkins of SemWare. @0 is a version
  22. * slightly modified by me to read the macfile of the first files in the
  23. * FileList.
  24.  
  25. * Following is the syntax:
  26. *
  27. *            Q.EXE [d:\][FileList].ql /E[d:\]QLST.mac
  28. *
  29. *
  30. * For my setup and to load files pertaining to QLST.QM my command is:
  31. *
  32. *            Q  QLST.ql /Eg:\qe\QLST.mac
  33. *
  34. * I keep QLST.MAC in g:\qe.
  35. *
  36. * Any subsequent FileList I load can be loaded with the following command:
  37. *
  38. *            Q [d:][FileList].ql /Eg:\qe\QLST.mac
  39. *
  40. * Place the macro by Kyle Watkins, Alt_1, FIRST in this file if you do
  41. * NOT wish to load the macro of the first files in the FileList or the
  42. * first files in the FileList does not have a macro. Then convert this
  43. * txtfile with QMAC. You will know this is necessary when you get a
  44. * beep and the following error message when loading files:
  45. *
  46. *        "File Not Found. Press <Esc>"
  47.  
  48. * (Other) Macros available: See ALLMACRO.INF.
  49.  
  50. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  51. *
  52. * To BEGIN, just type "START QLST" <Enter>. All pertinent files will be
  53. * loaded in the "Ring" for viewing, and QLST14.MAC is read.
  54. * Alternatively, type "START QLST 0" <Enter> and the disk copies of all
  55. * files in the "Ring" will be loaded ready for editing, saving time.
  56.  
  57. * You will see the files being loaded and when the macro completes you
  58. * should be editing this file. If you wish to load files from another
  59. * file list while QLST.mac is loaded, just load that file list in
  60. * another window and press Alt_0. Another option is to place this macro
  61. * in QCONFIG.DAT on one line and it will be available to load other
  62. * FileLists at all times while editing any file.
  63.  
  64. * You can also put the @z macro in FILExx.QM at the end of these macros
  65. * to get the job of loading files with a FileList "completely" done,
  66. * as shown at the end of the @0 macro, and also in QLST0.QM.
  67.  
  68. * See RINGxx.QM for other macros to load files from lists of files.
  69.  
  70. * 
  71. * ----------------------------------------------------------------------
  72. * @(0) Load Files From FileList, Read macfile of first file
  73. * ----------------------------------------------------------------------
  74.  
  75. * Txtfile extensions must be only 2 letters. I use "QM". Add a
  76. * "backspace" to last line of this macro if your txfile extensions
  77. * have 3 letters.
  78. *
  79. @0 macrobegin
  80.         endfile begline                 * Get to last file first
  81.  REPEAT:                                *
  82.         Unmarkblock Markline            * Mark it
  83.         Copy                            * Copy file name to scrap
  84.         Editfile Currentfilename " "    * Load current file plus
  85.         Paste Return                    * last marked on list into ring
  86.         Cursorup                        * If another file, move up
  87.  JTrue REPEAT:                          * When no more files
  88.         nextfile macroread              * read first file macro |
  89.         currentfilename                 *                       |TH mod
  90.         backspace backspace "mac" return*                       |
  91. *
  92. ** Add lines below to load disk copy of all files in "Ring" from FileList
  93. *               (see QLST0.QM for this revised macro)
  94. *        Editfile 'NUL' Return    * Insert -or- GoTo NUL File
  95. *        Begline Cursorright      * Put cursor in Col. 2 of NUL File
  96. *        LOOP:                    * Main test loop
  97. *            Nextfile             * Move to next file in Ring
  98. *            Cursorleft           * Move cursor left (need for NUL test)
  99. *            Jfalse LOOP:         * If couldn't move to left, it's not
  100. *                                 * the NUL File AND cursor position
  101. *                                 * has not changed -- LOOP again
  102. *                                 *ELSE
  103. *                                 * Check to see if in the NUL File
  104. *            Cursorleft           * Move cursor left for NUL Test
  105. *            Jfalse END:          * If couldn't move left -- We
  106. *                                 * ARE in the NUL File and Need
  107. *                                 * to END the Macro
  108. *                                 *ELSE
  109. *            Cursorright          * Move back to Col. 2 in NUL File
  110. *        END:                     * Macro is DONE
  111. *            Quit                 * Quit the NUL File
  112. * *
  113. *
  114. * 31 bytes Tue  07-31-1990  18:30:10
  115. * 31 bytes Thu  05-09-1991  16:25:46
  116.  
  117. * 
  118. * ----------------------------------------------------------------------
  119. * @(1) Load Files From FileList, Does NOT Read macfile of first file
  120. * ----------------------------------------------------------------------
  121. *
  122. * Use this macro, Alt_1, if you do NOT want to load the macro of the
  123. * first files in the FileList.
  124. *
  125. * In comparing this latest macro (as written by Kyle Watkins) to one
  126. * Tim Farley wrote earlier, the following message was sent to me on the
  127. * SemWare BBS by Tim, dated 7/31/90:
  128. *
  129. ************************************************************************
  130. * COMMENTS FROM TIM FARLEY - SemWare:
  131. *
  132. *
  133. *         Here's Kyle's version (much improved over mine, I must admit) of the
  134. *         file list loading macro.  Comments added by me.
  135. *
  136. * *
  137. * * LOAD A LIST OF FILES
  138. *
  139. @1   MacroBegin
  140.      EndFile BegLine              * start at last line
  141.    REPEAT:
  142.      UnmarkBlock MarkLine Copy    * grab this name
  143.      EditFile                     * get ready to load
  144.      CurrentFilename " "          * to force return *here*
  145.      Paste Return                 * paste file name & do it!
  146.      CursorUp                     * more lines above?
  147.      JTrue REPEAT:                * if yes, repeat.
  148. *
  149. *
  150. *        Not only is this macro far smaller than mine (by almost a factor of
  151. *        2!), but it has the following advantages:
  152. *
  153. *             * faster!
  154. *             * doesn't "change" the file list file
  155. *             * still loads files in same order they are in the list
  156. *             * returns to list file with no screen "flashing"
  157. *             * takes advantage of QEdit's deferred loading of files
  158. *
  159. *        That last bit is the main advantage:  by specifying CurrentFilename
  160. *        plus a space plus the desired file name on the EditFile prompt, we
  161. *        load both the current file, plus the file we desire.  This takes
  162. *        advantage of the fact that the EditFile, just like the QEdit command
  163. *        line, can accept multiple file names together, separated by spaces.
  164. *
  165. *
  166. *        But loading the current file just returns us to the buffer we are in
  167. *        with no disk access.  So the end result is that the file from the
  168. *        list is entered in QEdit's "ring" *without* actually loading it.  It
  169. *        only loads when you try to Nextfiles into it, just as if you had
  170. *        loaded the list via a wildcard.  Neat!
  171. *
  172. *        Kyle really came up with a far better solution here.
  173. *
  174. *        --Tim Farley
  175. *
  176. * ----------------------------------------------------------------------
  177. *
  178. * Version History:
  179. *
  180. *       1.0a - modified to include Alt_1, Changed documentation.
  181. *            - added QLST.BAT for quick startup
  182. *       1.0b - Changed name QLSTxx to QLSTxx
  183. *            - Modified QLST.BAT
  184. *       1.1  - QLST.QL was setup for my system. Correct version
  185. *              requiring no changes is in v1.1.
  186. *       1.2  - Modified documentation concerning error messages
  187. *              when loading files.
  188. *       1.2a - Modified documentation
  189. *       1.3  - Modified documentation and added START.BAT.
  190. *            - Changed QLIST file names to QLST.
  191. *            - Added option to @0 to have all files loaded in ring.
  192. *       1.4  - Changed file name ! to NUL in @0 in QLST0.QM.
  193. *       1.4a - Minor documentation changes.
  194. *
  195. *
  196. *
  197.